<h1>{$news->getTitle()}</h1>
<div class="float-left"><i>posted {if $user}by {$user->getUsername()} {/if}on {$news->getDate()}</i></div>
<div class="float-right"><a href="news_comment_add.php?id={$news->getID()}">{$paginate.total} comment{if $paginate.total > 1}s{/if}</a></div>
<div class="clear"></div>
<p>{$news->getContent()|nl2br}</p>
{if $paginate.total > 0 && $paginate.current_item <= $paginate.total}
	<br />
	<div class="center">
		{include file="general/pagination_item_range.tpl"}
	</div>
	<br />
{/if}
<h1>Comments</h1>
{foreach $news_comments as $news_comment}
	<div><b><i>{$news_comment.username} on {$news_comment.date}</i></b></div>
	<p>{$news_comment.comment|nl2br}</p>
{foreachelse}
	<p class="center">No news comment matches found in the database.</p>
{/foreach}
{if $news_comment@show}
	<br />
	<div class="center">
		{include file="general/pagination_page_number.tpl"}
	</div>
	<br />
{/if}
<h1>Add comment</h1>
{if $user_authenticated}
	<form action="" method="post">
		<div class="form-field">
			<label>Comment:</label>
			<textarea name="content" rows="0" cols="0" class="fill">{$content}</textarea>
		</div>
		<div class="form-field center">
			<input type="submit" name="post_button" value="Post" />
		</div>
	</form>
{else}
	<p class="center">
		You must be logged in to post a comment.
	</p>
{/if}